package cn.com.jenson.service.file.service;

import cn.com.jenson.common.BasicService;
import cn.com.jenson.dao.file.bo.FileBo;
import cn.com.jenson.dao.file.searchBo.FileSearchBo;
import cn.com.jenson.dao.file.vo.FileVo;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.ResponseEntity;

import java.io.IOException;

public interface FileService extends BasicService<FileVo, FileBo, FileSearchBo> {

    FileVo get(Integer id) throws InstantiationException, IllegalAccessException;

    FileVo upload(FileBo fileBo) throws InstantiationException, IllegalAccessException, IOException;

    ResponseEntity<InputStreamResource> download(FileSearchBo fileSearchBo) throws IOException, InstantiationException, IllegalAccessException;

    ResponseEntity<InputStreamResource> download(Integer id) throws IOException, InstantiationException, IllegalAccessException;
}
